From 0103c5e5125927669a2366951f2acc83deeed71e Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 3 Apr 2008 11:32:20 +0100 Subject: [PATCH] xend, acm: Prevent labeling of vlans with the same color Signed-off-by: Stefan Berger --- tools/python/xen/util/xsm/acm/acm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/python/xen/util/xsm/acm/acm.py b/tools/python/xen/util/xsm/acm/acm.py index e8de0fa60c..ed93e28485 100644 --- a/tools/python/xen/util/xsm/acm/acm.py +++ b/tools/python/xen/util/xsm/acm/acm.py @@ -1220,6 +1220,9 @@ def set_resource_label(resource, policytype, policyref, reslabel, \ return -xsconstants.XSERR_BAD_LABEL if tmp[2] != oreslabel: return -xsconstants.XSERR_BAD_LABEL + if resource.startswith('vlan:'): + if tuple([policytype, policyref, reslabel]) in access_control.values(): + return -xsconstants.XSERR_BAD_LABEL if reslabel != "": new_entry = { resource : tuple([policytype, policyref, reslabel])} access_control.update(new_entry) -- 2.30.2